﻿/**
 * The notion of a controller in the system. 
 * Author: Anders Høst | ahkj@itu.dk
 * Date:   05 Dec 2010
 */
using System.Collections.Generic;
using Midi;

namespace AutomaTones.Controller {
    interface IController<V>{
        /// <summary>
        /// True if this controller whishes the to play music.
        /// </summary>
        bool IsPLaying { get; set; }

        /// <summary>
        /// Make this controller pause.
        /// </summary>
        void Pause();

        /// <summary>
        /// Makes the controller play. If senseful this will set IsPlaying = true.
        /// </summary>
        void Play();

        /// <summary>
        /// Makes the controller rewind
        /// </summary>
        void Rewind();

        /// <summary>
        /// Makes the controller go forward.
        /// </summary>
        void Forward();

        /// <summary>
        /// Add a view to this controller. Controllers define what kind of views they reflect. 
        /// </summary>
        /// <param name="v"></param>
        void AddView(V v);

        /// <summary>
        /// Set up the controller with relevant external resources.  
        /// </summary>
        void SetUp();

        /// <summary>
        /// Set or get the midi channels that this controllers has available.
        /// </summary>
        List<Channel> Channels { get; set; }

        /// <summary>
        /// Set or gets the volume that the controller should send on its channels.
        /// </summary>
        int Volume { get; set; }

        /// <summary>
        /// Asks controllers that compose themselves with Cellular Automatons to evolve on these. 
        /// </summary>
        void Evolve();
    }
}
